package com.lvmama.rhino.service.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lvmama.rhino.mapperDw.ProductBranchViewMapper;
import com.lvmama.rhino.pojo.ProductBranchView;
import com.lvmama.rhino.pojo.StockDetailQuery;
import com.lvmama.rhino.service.ProductBranchViewService;

/**
 * @Author:caoyong
 * @Description:
 * @Date：2018/5/16
 */
@Service("productBranchViewService")
public class ProductBranchViewServiceImpl implements ProductBranchViewService {
    private Logger log = Logger.getLogger(ProductBranchViewServiceImpl.class);

    @Autowired
    private ProductBranchViewMapper productBranchViewMapper;

	@Override
	public List<ProductBranchView> selectProductList() {
		log.info("selectProductList start" );
		try {
			return productBranchViewMapper.selectProductList();
		} catch (Exception e) {
			log.error("selectProductList error:" + e.getMessage(), e);
		}
		return null;
	}

	@Override
	public List<ProductBranchView> selectBranchList(StockDetailQuery query) {
		log.info("selectBranchList start" );
		try {
			return productBranchViewMapper.selectBranchList(query);
		} catch (Exception e) {
			log.error("selectBranchList error:" + e.getMessage(), e);
		}
		return null;
	}
}
